<?php

/*
	Class: Homepage_Plugin

	About: Author
		Rich Joslin

	About: License
		<http://communit.as/docs/license>
*/
class Homepage_Plugin {

	/* Group: Constructors */

	/*
		Function: Homepage_Plugin
	*/
	function Homepage_Plugin() {
		
	}

	/* Group: Instance Methods */

	/*
		Function: install
	*/
	function install($params) {
		return $params;
	}

	/*
		Function: uninstall
	*/
	function uninstall($params) {
		return $params;
	}

	/*
		Function: enable
	*/
	function enable($params) {
		return $params;
	}

	/*
		Function: disable
	*/
	function disable($params) {
		return $params;
	}

	/*
		Function: addHomepageVars

		Arguments:
			params - An array of parameters passed in from the /default/index/index action (the homepage action).

		Returns: param array
	*/
	function addHomepageVars($params) {
		// add new vars to params here
		$users_table = new Users();
		$params['recently_registered'] = $users_table->getRecentlyRegistered(Cts_Registry::get('recently_registered_count', 'homepage'));
		$params['recently_updated'] = $users_table->getRecentlyUpdated(Cts_Registry::get('recently_updated_count', 'homepage'));
		$params['recently_online'] = $users_table->getRecentlyOnline(Cts_Registry::get('recently_online_count', 'homepage'));
		return $params;
	}

}
